<template>
    <div class="webplaceholderstyle">
        <!-- 标题 -->
        <h2>{{ datas.text }}</h2>
        <!-- 类型选择 -->
        <el-radio v-model="commodityType" label="0">web占位</el-radio>
        <div class="placeHoldercontent">
            <p>选择链接：</p>
            <div class="opText">
                <select-link @selectThisLink="selectThisLink" @clearThisLink="clearThisLink" :linktypeurl="datas.url" />
            </div>
        </div>
    </div>
</template>
  
<script>
import SelectLink from "../../selectLink";
export default {
    name: "Webplaceholderstyle",
    components: { SelectLink },
    props: {
        datas: Object,
    },
    data() {
        return {
            interurl: "",
            commodityType: '0'
        };
    },
    methods: {
        selectThisLink(resu) {
            this.datas.url = resu.url;
        },
        clearThisLink (index) {
            this.datas.url = '';
        }
    },
    created() {
        this.interurl = this.datas.url;
        this.commodityType = String(this.datas.commodityType);
    },
};
</script>
  
<style scoped lang="scss">
.webplaceholderstyle {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    padding: 0 10px 20px;
    box-sizing: border-box;
    /* 标题 */
    h2 {
        padding: 24px 16px 24px 0;
        margin-bottom: 15px;
        border-bottom: 1px solid #f2f4f6;
        font-size: 18px;
        font-weight: 600;
        color: #323233;
    }
    .placeHoldercontent {
        padding: 10px 0;
        p {
        display: block;
        margin-bottom: 10px;
        }
    }
}
</style>
  